Introduction

KRSS is an acronym of Knowledge Representation System Specification. You can find the exact specification at http://www.bell-labs.com/user/pfps/papers/krss-spec.ps. Note that this is an abstract specification and any particular system that utilizes it is not required to accept/recognize all of the specified constructs.

Basic Constructs

KRSS uses Lisp-like syntax. Each top level expression is refered to as 'statement'.
Following is a formal grammar of the krss format recognized by BOR:
krrs-file ::= <tbox-stmt>* end-tbox? <abox-stmt>* end-abox? ;;

tbox-stmt ::= (primitive-concept <concept-name>)
            | (define-primitive-concept <concept-name> <concept-expr>)
            | (define-concept <concept-name> <concept-expr>)
            | (subrole <subrole-name> <super-role-name>)
            | (transitive <role-name>)
            | (enum <enum-datatype-name> <member-name>+)
            | (range <role-name> <datatype-name>)
            ;;

concept-expr ::= <concept-name>
               | (and <concept-expr>+)
               | (or  <concept-expr>+)
               | (not <concept-expr>)
               | (all  <role-name> <concept-expr-or-dataset-transcript>)
               | (some <role-name> <concept-expr-or-dataset-transcript>)
               | (none <role-name> <concept-expr-or-dataset-transcript>)
               | (at-least <integer> <role-name> <concept-expr-or-dataset-transcript>?)
               | (at-most  <integer> <role-name> <concept-expr-or-dataset-transcript>?)
               | (exactly  <integer> <role-name> <concept-expr-or-dataset-transcript>?)
               ;;

concept-expr-or-dataset-transcript ::=  |  ;;

abox-stmt ::= (instance <individual-name> <concept-expr>)
            | (related  <subject-name> <role-name> <object-name>)
            | (equal    <individual-name> <another-individual-name>)
            | (distinct <individual-name> <another-individual-name>)
            ;;

Comments

Example

(enum SkinColor (white black yellow red albino))
(enum EyeColor  (blue brown green hazel black albino))

(range skin-color SkinColor)
(range eye-color  EyeColor)
(range age Int)

(def-c indian (some skin-color "red"))
(def-c adult (some age "[18,+oo)"))
(def-c mother-of-an-adult-blue-eyed-indian
         (some has-child (and adult indian (some eye-color "blue"))))
(def-c target mother-of-an-adult-indian)

end-tbox